-------------------BVT ends here--------------------------
  
'************************************************************************
'below is performance test cases.  

'For performance testing, we may need to add more licenses (just uncomment
'the adding actions.

'the test cases 8878 is also covered here  
8877:Add multiple licenses with unique kid 
TestLicStoreReinitialize(0)
TestLicStoreOpenStore(Normal LS Context,Valid HDS,1)
TestLicStoreLog(0,Results of Performance Testing to License Store)
TestLicStoreLog(1,NULL)
TestLicStoreAddMultiLicenses(perflicense1.txt,10000,1,16)
TestLicStoreLog(2,Added the first 10000 unique licenses to the store)
TestLicStoreLog(1,NULL)
'TestLicStoreAddMultiLicenses(perflicense1.txt,10000,10001,16)
'TestLicStoreLog(2,Added the second 10000 unique licenses to the store)
'TestLicStoreLog(1,NULL)
'TestLicStoreAddMultiLicenses(perflicense1.txt,10000,20001,16)
'TestLicStoreLog(2,Added the third 10000 unique licenses to the store)
'TestLicStoreLog(1,NULL)
'TestLicStoreAddMultiLicenses(perflicense1.txt,10000,30001,16)
'TestLicStoreLog(2,Added the fourth 10000 unique licenses to the store)
'TestLicStoreLog(1,NULL)
'TestLicStoreAddMultiLicenses(perflicense1.txt,10000,40001,16)
'TestLicStoreLog(2,Added the fifth 10000 unique licenses to the store)
'TestLicStoreLog(1,NULL)
'TestLicStoreAddMultiLicenses(perflicense1.txt,10000,50001,16)
'TestLicStoreLog(2,Added the sixth 10000 unique licenses to the store)
'TestLicStoreLog(1,NULL)
'TestLicStoreAddMultiLicenses(perflicense1.txt,10000,60001,16)
'TestLicStoreLog(2,Added the seventh 10000 unique licenses to the store)
'TestLicStoreLog(1,NULL)
'TestLicStoreAddMultiLicenses(perflicense1.txt,10000,70001,16)
'TestLicStoreLog(2,Added the eigth 10000 unique licenses to the store)
'TestLicStoreLog(1,NULL)
'TestLicStoreAddMultiLicenses(perflicense1.txt,10000,80001,16)
'TestLicStoreLog(2,Added the ninth 10000 unique licenses to the store)
'TestLicStoreLog(1,NULL)
'TestLicStoreAddMultiLicenses(perflicense1.txt,10000,90001,16)
'TestLicStoreLog(2,Added the tenth 10000 unique licenses to the store)
TestLicStoreCloseStore(Dump,0,0) 
TestLicStoreReinitialize(0)

'**********************************************************************************
'The following actions are operated on top of the large license base created above

TestLicStoreLog(3,The following actions are operated on top of the above base licenses in the store)

'Add multiple licenses with the same kid 
TestLicStoreReinitialize(0)
TestLicStoreLog(1,NULL)
TestLicStoreOpenStore(Normal LS Context,Valid HDS)
TestLicStoreAddMultiLicenses(perflicense1.txt,1000,200000,0)
TestLicStoreCloseStore(Dump,0,0) 
TestLicStoreLog(2,Added the 1000 licenses of the same KID)
TestLicStoreReinitialize(0)

'Get an existed license from this base
TestLicStoreReinitialize(0)
TestLicStoreLog(1,NULL)
TestLicStoreOpenStore(Normal LS Context,Valid HDS)
TestLicStoreAddLicense(Dump,0,perflicense2.txt,4)
TestLicStoreCloseStore(Dump,0,0) 
TestLicStoreOpenStore(Normal LS Context,Valid HDS)
TestLicStoreGetLicenseKeys(perflicense2.txt)
TestLicStoreGetLicense(Dump,Dump,Dump,NULL,0,4)
TestLicStoreCloseStore(Dump,0,0) 
TestLicStoreLog(2,Got a license)
TestLicStoreReinitialize(0)

'enumerate licenses
TestLicStoreReinitialize(0)
TestLicStoreOpenStore(Normal LS Context,Valid HDS)
TestLicStoreInitEnum(Dump,NULL,0,Dump,16) 
TestLicStoreEnumNext(Dump,Dump,Dump,0,NULL,NULL,0)
TestLicStoreEnumNext(Dump,Dump,Dump,0,NULL,NULL,0)
TestLicStoreEnumNext(Dump,Dump,Dump,0,NULL,NULL,0)
TestLicStoreEnumNext(Dump,Dump,Dump,0,NULL,NULL,0)
TestLicStoreEnumNext(Dump,Dump,Dump,0,NULL,NULL,0)
TestLicStoreEnumNext(Dump,Dump,Dump,0,NULL,NULL,0)
TestLicStoreCloseStore(Dump,1,0) 
TestLicStoreReinitialize(0)

'this action will remove the perflog file. For the daily run, we
'don't keep this file of performance testing
TestLicStoreLog(4,NULL)


